package com.scpii.universal.util;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.scpii.universal.generator.Generator;
import com.scpii.universal.hibernate.dao.BaseDao;
import com.scpii.universal.hibernate.entity.ActiveUserTab;
import com.scpii.universal.hibernate.entity.AppDetailPageModuleTab;
import com.scpii.universal.hibernate.entity.AppDetailPageTab;
import com.scpii.universal.hibernate.entity.AppIconTab;
import com.scpii.universal.hibernate.entity.AppLoadingUpdateTab;
import com.scpii.universal.hibernate.entity.AppPageTab;
import com.scpii.universal.hibernate.entity.AppPageViewTab;
import com.scpii.universal.hibernate.entity.AppStyleTab;
import com.scpii.universal.hibernate.entity.AppTab;
import com.scpii.universal.hibernate.entity.AppUpdateTab;
import com.scpii.universal.hibernate.entity.AppViewCatelogRalationTab;
import com.scpii.universal.hibernate.entity.AppViewContentRalationTab;
import com.scpii.universal.hibernate.entity.AttributeListTab;
import com.scpii.universal.hibernate.entity.AttributeTab;
import com.scpii.universal.hibernate.entity.AttributeValueTab;
import com.scpii.universal.hibernate.entity.CatelogTab;
import com.scpii.universal.hibernate.entity.ClientUserTab;
import com.scpii.universal.hibernate.entity.CommentTab;
import com.scpii.universal.hibernate.entity.CompileTaskTab;
import com.scpii.universal.hibernate.entity.ContentImgTab;
import com.scpii.universal.hibernate.entity.ContentTab;
import com.scpii.universal.hibernate.entity.DataInterfaceUpdateTab;
import com.scpii.universal.hibernate.entity.EnterpShopTab;
import com.scpii.universal.hibernate.entity.EnterpriseTab;
import com.scpii.universal.hibernate.entity.FavoritesTab;
import com.scpii.universal.hibernate.entity.FeedbackTab;
import com.scpii.universal.hibernate.entity.ManageUserTab;
import com.scpii.universal.hibernate.entity.ModuleStyleTab;
import com.scpii.universal.hibernate.entity.MoreContentTab;
import com.scpii.universal.hibernate.entity.OrderTab;
import com.scpii.universal.hibernate.entity.PageAttributeTab;
import com.scpii.universal.hibernate.entity.PageNavigationTab;
import com.scpii.universal.hibernate.entity.PushMessageTab;
import com.scpii.universal.hibernate.entity.ShareTab;
import com.scpii.universal.hibernate.entity.SysCateAttributeTab;
import com.scpii.universal.hibernate.entity.SystemCateTab;
import com.scpii.universal.hibernate.entity.TypeTab;
import com.scpii.universal.hibernate.entity.UserWeiboTab;
import com.scpii.universal.hibernate.entity.ViewContentAttributeTab;
import com.scpii.universal.service.mobile.MobileAppService;
import com.scpii.universal.service.mobile.MobileContentService;
import com.scpii.universal.service.mobile.MobileEnterpService;
import com.scpii.universal.service.mobile.MobileFunctionService;
import com.scpii.universal.service.mobile.MobileUserService;

public class SpringBeanFactory {
	private static BeanFactory beanFactory = new ClassPathXmlApplicationContext("applicationContext*.xml");

	public static Object createInstanse(String beanId) {
		Object obj = beanFactory.getBean(beanId);
		return obj;
	}
	
	public static BaseDao<ClientUserTab> clientUserTabDao = (BaseDao<ClientUserTab>) SpringBeanFactory.createInstanse("ClientUserTabBean");

	/**
	 * 通过Spring注入生成的泛型化DAO对象
	 * **/
	/**
	public static BaseDao<ActiveUserTab> activeUserTabDao = (BaseDao<ActiveUserTab>) SpringBeanFactory.createInstanse("ActiveUserTabBean");
	public static BaseDao<AppIconTab> appIconTabDao = (BaseDao<AppIconTab>)SpringBeanFactory.createInstanse("AppIconTabBean");
	public static BaseDao<AppPageTab> appPageTabDao = (BaseDao<AppPageTab>) SpringBeanFactory.createInstanse("AppPageTabBean");
	public static BaseDao<AppStyleTab> appStyleTabDao = (BaseDao<AppStyleTab>) SpringBeanFactory.createInstanse("AppStyleTabBean");
	public static BaseDao<AppTab> appTabDao = (BaseDao<AppTab>) SpringBeanFactory.createInstanse("AppTabBean");
	public static BaseDao<AppUpdateTab> appUpdateTabDao = (BaseDao<AppUpdateTab>) SpringBeanFactory.createInstanse("AppUpdateTabBean");
	public static BaseDao<AttributeListTab> attributeListTabDao = (BaseDao<AttributeListTab>) SpringBeanFactory.createInstanse("AttributeListTabBean");
	public static BaseDao<AttributeTab> attributeTabDao = (BaseDao<AttributeTab>) SpringBeanFactory.createInstanse("AttributeTabBean");
	public static BaseDao<AttributeValueTab> attributeValueTabDao = (BaseDao<AttributeValueTab>) SpringBeanFactory.createInstanse("AttributeValueTabBean");
	public static BaseDao<CatelogTab> catelogTabDao = (BaseDao<CatelogTab>) SpringBeanFactory.createInstanse("CatelogTabBean");
	public static BaseDao<ClientUserTab> clientUserTabDao = (BaseDao<ClientUserTab>) SpringBeanFactory.createInstanse("ClientUserTabBean");
	public static BaseDao<CommentTab> commentTabDao= (BaseDao<CommentTab>) SpringBeanFactory.createInstanse("CommentTabBean");
	public static BaseDao<CompileTaskTab> compileTaskTabDao = (BaseDao<CompileTaskTab>) SpringBeanFactory.createInstanse("CompileTaskTabBean");
	public static BaseDao<ContentImgTab> contentImgTabDao = (BaseDao<ContentImgTab>) SpringBeanFactory.createInstanse("ContentImgTabBean");
	public static BaseDao<DataInterfaceUpdateTab> dataInterfaceUpdateTabDao = (BaseDao<DataInterfaceUpdateTab>) SpringBeanFactory.createInstanse("DataInterfaceUpdateTabBean");
	public static BaseDao<ContentTab> contentTabDao = (BaseDao<ContentTab>) SpringBeanFactory.createInstanse("ContentTabBean");
	public static BaseDao<EnterpriseTab> enterpriseTabDao = (BaseDao<EnterpriseTab>) SpringBeanFactory.createInstanse("EnterpriseTabBean");
	public static BaseDao<EnterpShopTab> enterpShopTabDao = (BaseDao<EnterpShopTab>) SpringBeanFactory.createInstanse("EnterpShopTabBean");
	public static BaseDao<FavoritesTab> favoritesTabDao = (BaseDao<FavoritesTab>) SpringBeanFactory.createInstanse("FavoritesTabBean");
	public static BaseDao<FeedbackTab> feedbackTabDao = (BaseDao<FeedbackTab>) SpringBeanFactory.createInstanse("FeedbackTabBean");
	public static BaseDao<ManageUserTab> manageUserTabDao = (BaseDao<ManageUserTab>) SpringBeanFactory.createInstanse("ManageUserTabBean");
	public static BaseDao<ModuleStyleTab> moduleStyleTabDao = (BaseDao<ModuleStyleTab>) SpringBeanFactory.createInstanse("ModuleStyleTabBean");
	public static BaseDao<MoreContentTab> moreContentTabDao = (BaseDao<MoreContentTab>) SpringBeanFactory.createInstanse("MoreContentTabBean");
	public static BaseDao<OrderTab> orderTabDao = (BaseDao<OrderTab>) SpringBeanFactory.createInstanse("OrderTabBean");
	public static BaseDao<PageAttributeTab> pageAttributeTabDao = (BaseDao<PageAttributeTab>) SpringBeanFactory.createInstanse("PageAttributeTabBean");
	public static BaseDao<PageNavigationTab> pageNavigationTabDao = (BaseDao<PageNavigationTab>) SpringBeanFactory.createInstanse("PageNavigationTabBean");
	public static BaseDao<PageTitleTab> pageTitleTabDao = (BaseDao<PageTitleTab>) SpringBeanFactory.createInstanse("PageTitleTabBean");
	public static BaseDao<PushMessageTab> pushMessageTabDao = (BaseDao<PushMessageTab>) SpringBeanFactory.createInstanse("PushMessageTabBean");
	public static BaseDao<ShareTab> shareTabDao = (BaseDao<ShareTab>) SpringBeanFactory.createInstanse("ShareTabBean");
	public static BaseDao<SysCateAttributeTab> sysCateAttributeTabDao = (BaseDao<SysCateAttributeTab>) SpringBeanFactory.createInstanse("SysCateAttributeTabBean");
	public static BaseDao<SystemCateTab> systemCateTabDao = (BaseDao<SystemCateTab>) SpringBeanFactory.createInstanse("SystemCateTabBean");
	public static BaseDao<TitlePageTab> titlePageTabDao = (BaseDao<TitlePageTab>) SpringBeanFactory.createInstanse("TitlePageTabBean");
	public static BaseDao<TypeTab> typeTabDao = (BaseDao<TypeTab>) SpringBeanFactory.createInstanse("TypeTabBean");
	public static BaseDao<UserWeiboTab> userWeiboTabDao = (BaseDao<UserWeiboTab>) SpringBeanFactory.createInstanse("UserWeiboTabBean");
	public static BaseDao<WebMenuTab> webMenuTabDao = (BaseDao<WebMenuTab>) SpringBeanFactory.createInstanse("WebMenuTabBean");
	public static BaseDao<AppLoadingUpdateTab> appLoadingUpdateTabDao = (BaseDao<AppLoadingUpdateTab>) SpringBeanFactory.createInstanse("AppLoadingUpdateTabBean");
	public static BaseDao<AppDetailPageModuleTab> appDetailPageModuleTabDao = (BaseDao<AppDetailPageModuleTab>) SpringBeanFactory.createInstanse("AppDetailPageModuleTabBean");
	public static BaseDao<AppDetailPageTab> appDetailPageTabDao = (BaseDao<AppDetailPageTab>) SpringBeanFactory.createInstanse("AppDetailPageTabBean");
	public static BaseDao<AppPageViewTab> appPageViewTabDao = (BaseDao<AppPageViewTab>) SpringBeanFactory.createInstanse("AppPageViewTabBean");
	public static BaseDao<AppViewCatelogRalationTab> appViewCatelogRelationTabDao = (BaseDao<AppViewCatelogRalationTab>) SpringBeanFactory.createInstanse("AppViewCatelogRelationTabBean");
	public static BaseDao<ViewContentAttributeTab> viewContentAttributeTabBeanDao =(BaseDao<ViewContentAttributeTab>) SpringBeanFactory.createInstanse("ViewContentAttributeTabBean");
	public static BaseDao<AppViewContentRalationTab> appViewContentRelationTabDao = (BaseDao<AppViewContentRalationTab>) SpringBeanFactory.createInstanse("AppViewContentRelationTabBean");
	
	public static MobileAppService mobileAppService = (MobileAppService) SpringBeanFactory.createInstanse("mobileAppService");
	public static MobileContentService mobileContentService = (MobileContentService) SpringBeanFactory.createInstanse("mobileContentService");
	public static MobileEnterpService mobileEnterpService = (MobileEnterpService) SpringBeanFactory.createInstanse("mobileEnterpService");
	public static MobileFunctionService mobileFunctionService = (MobileFunctionService) SpringBeanFactory.createInstanse("mobileFunctionService");
	public static MobileUserService mobileUserService = (MobileUserService) SpringBeanFactory.createInstanse("mobileUserService");
	**/
	
	public static Generator generator = (Generator) SpringBeanFactory.createInstanse("generator");
}
